home *** CD-ROM | disk | FTP | other *** search
- @echo off
-
- Mutex /o clean.lock
- if errorlevel 1 goto errorlocked
-
- @if "doit%1" == "doitall" goto doitall
- @if "doit%1" == "doitAll" goto doitall
- @if "doit%1" == "doitALL" goto doitall
-
- if exist groovecmxmit.xss del groovecmxmit.xss >NUL
- if exist groovecmxmit_xss.log del groovecmxmit_xss.log >NUL
-
- if exist groovecmrecv.xss del groovecmrecv.xss >NUL
- if exist groovecmrecv_xss.log del groovecmrecv_xss.log >NUL
-
- if exist csm.xss del csm.xss >NUL
- if exist csm_xss.log del csm_xss.log >NUL
-
- if exist groove.xss del groove.xss >NUL
- if exist groove_xss.log del groove_xss.log >NUL
-
- if "%OS%" == "Windows_NT" if exist _SystemInstall_ rmdir /s /q _SystemInstall_ >NUL
- if NOT "%OS%" == "Windows_NT" deltree /y _SystemInstall_ >NUL
-
- echo.
- echo Performed MINIMAL clean (Accounts not deleted)
- echo. | time | find /i "current"
- echo.
- Mutex /c clean.lock
- goto success
-
- :doitall
-
- if exist *.tsp del *.tsp >NUL
- if exist *.grv del *.grv >NUL
- if exist groovecmxmit.xml del groovecmxmit.xml >NUL
- if exist groovecmrecv.xml del groovecmrecv.xml >NUL
- if exist cmdebug.xml del cmdebug.xml >NUL
- if exist ram.xml del ram.xml >NUL
- if exist EventLog.xml del EventLog.xml >NUL
- if exist TransportCache.xml del TransportCache.xml >NUL
- if exist id.xml del id.xml >NUL
- if exist csmshared.xml del csmshared.xml >NUL
- if exist csmipc.* del csmipc.* >NUL
- if exist *.id del *.id >NUL
- if exist *.tmp del *.tmp >NUL
-
- rem *** Clean up Account directories
- if "%OS%" == "Windows_NT" goto NTAccountClean
- deltree /y Accounts >NUL
- goto AccountCleanDone
-
- :NTAccountClean
- if exist Accounts rmdir /s /q Accounts >NUL
-
- :AccountCleanDone
-
- rem *** Clean up directories
- if "%OS%" == "Windows_NT" goto NTCleanDirs
- deltree /y groovecmxmit.xss_ >NUL
- deltree /y groovecmrecv.xss_ >NUL
- deltree /y csm.xss_ >NUL
- deltree /y groove.xss_ >NUL
- deltree /y _SystemInstall_ >NUL
- goto CleanDirsDone
-
- :NTCleanDirs
- if exist groovecmxmit.xss_ rmdir /s /q groovecmxmit.xss_ >NUL
- if exist groovecmrecv.xss_ rmdir /s /q groovecmrecv.xss_ >NUL
- if exist groove.xss_ rmdir /s /q groove.xss_ >NUL
- if exist _SystemInstall_ rmdir /s /q _SystemInstall_ >NUL
-
- :CleanDirsDone
-
- rem *** Make copies of the XSS files we want to preserve, giving them an XOS suffix
- rem *** so that we can use del *.xss (Unix 'find' would be nice here).
- rem *** Also copy the corresponding logs so that we don't get a lost log error.
- if exist *.xos del *.xos >NUL
- if exist *.xog del *.xog >NUL
- if exist schemas.xss copy schemas.xss schemas.xos >NUL
- if exist schemas_xss.log copy schemas_xss.log schemas_xss.xog >NUL
- if exist templates.xss copy templates.xss templates.xos >NUL
- if exist templates_xss.log copy templates_xss.log templates_xss.xog >NUL
- if exist securitytemplates.xss copy securitytemplates.xss securitytemplates.xos >NUL
- if exist securitytemplates_xss.log copy securitytemplates_xss.log securitytemplates_xss.xog >NUL
- if exist transformations.xss copy transformations.xss transformations.xos >NUL
- if exist transformations_xss.log copy transformations_xss.log transformations_xss.xog >NUL
- if exist themes.xss copy themes.xss themes.xos >NUL
- if exist themes_xss.log copy themes_xss.log themes_xss.xog >NUL
- if exist registries.xss copy registries.xss registries.xos >NUL
- if exist registries_xss.log copy registries_xss.log registries_xss.xog >NUL
- if exist osd.xss copy osd.xss osd.xos >NUL
- if exist osd_xss.log copy osd_xss.log osd_xss.xog >NUL
- if exist components.xss copy components.xss components.xos >NUL
- if exist components_xss.log copy components_xss.log components_xss.xog >NUL
- if exist offline.xss copy offline.xss offline.xos >NUL
- if exist offline_xss.log copy offline_xss.log offline_xss.xog >NUL
-
- :Groove
- if exist *.xss del *.xss >NUL
- if exist *.log del *.log >NUL
-
- :Share
- if not exist Share\NUL goto Final
- if not exist Share\* goto Share2
- echo Y | del Share\* >NUL
-
- :Share2
- rmdir Share>NUL
-
- :Final
- rem *** Rename the XOS files back to XSS files. If someone was holding one of the
- rem *** XSS files open when we deleted *.xss, that file won't have been deleted, so
- rem *** test first.
- if exist schemas.xos if not exist schemas.xss ren schemas.xos schemas.xss
- if exist templates.xos if not exist templates.xss ren templates.xos templates.xss
- if exist securitytemplates.xos if not exist securitytemplates.xss ren securitytemplates.xos securitytemplates.xss
- if exist transformations.xos if not exist transformations.xss ren transformations.xos transformations.xss
- if exist themes.xos if not exist themes.xss ren themes.xos themes.xss
- if exist registries.xos if not exist registries.xss ren registries.xos registries.xss
- if exist osd.xos if not exist osd.xss ren osd.xos osd.xss
- if exist components.xos if not exist components.xss ren components.xos components.xss
- if exist offline.xos if not exist offline.xss ren offline.xos offline.xss
- if exist schemas_xss.xog if not exist schemas_xss.log ren schemas_xss.xog schemas_xss.log
- if exist templates_xss.xog if not exist templates_xss.log ren templates_xss.xog templates_xss.log
- if exist securitytemplates_xss.xog if not exist securitytemplates_xss.log ren securitytemplates_xss.xog securitytemplates_xss.log
- if exist transformations_xss.xog if not exist transformations_xss.log ren transformations_xss.xog transformations_xss.log
- if exist themes_xss.xog if not exist themes_xss.log ren themes_xss.xog themes_xss.log
- if exist registries_xss.xog if not exist registries_xss.log ren registries_xss.xog registries_xss.log
- if exist osd_xss.xog if not exist osd_xss.log ren osd_xss.xog osd_xss.log
- if exist components_xss.xog if not exist components_xss.log ren components_xss.xog components_xss.log
- if exist offline_xss.xog if not exist offline_xss.log ren offline_xss.xog offline_xss.log
-
- rem *** Delete any XOS files left over (for which the XSS files were never deleted).
- if exist *.xos del *.xos >NUL
- if exist *.xog del *.xog >NUL
- echo.
- echo Performed COMPLETE clean (Accounts deleted)
- echo. | time | find /i "current"
- echo.
-
- Mutex /c clean.lock
- goto success
-
- :errorlocked
- echo Another clean is running. Quitting.
- echo.
-
- :success
-